package edu.lingnan.reactproject.controller;


import edu.lingnan.reactproject.service.CategorysService;
import edu.lingnan.reactproject.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 陈世杰
 * @since 2022-01-15
 */
@RestController
@RequestMapping("/manage/categorys")
public class CategorysController {
    @Autowired(required = false)
    private CategorysService categorysService;

    @GetMapping("/list")
    public Result list(String parentId){
        return categorysService.getCategoryList(parentId);
    }
}

